package com.youlai.boot.system.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import jakarta.validation.constraints.*;

/**
 * 试题管理表单对象
 *
 * @author youlaitech
 * @since 2025-07-17 09:22
 */
@Getter
@Setter
@Schema(description = "试题管理表单对象")
public class ExamQuestionForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
//    @NotNull(message = "主键不能为空")
    private Long id;

//    @Schema(description = "创建时间")
//    @NotNull(message = "创建时间不能为空")
//    private ${fieldConfig.fieldType} addtime;

    @Schema(description = "所属试卷ID")
    @NotNull(message = "所属试卷ID不能为空")
    private Long paperId;

    @Schema(description = "试卷名称")
    @Size(max=200, message="试卷名称长度不能超过200个字符")
    private String paperName;

    @Schema(description = "试题类型")
    @NotBlank(message = "试题类型不能为空")
    @Size(max=50, message="试题类型长度不能超过50个字符")
    private String type;

    @Schema(description = "题目内容")
    @NotBlank(message = "题目内容不能为空")
    @Size(max=65535, message="题目内容长度不能超过65535个字符")
    private String content;

    @Schema(description = "选项(JSON格式存储)")
    @Size(max=65535, message="选项(JSON格式存储)长度不能超过65535个字符")
    private String options;

    @Schema(description = "题目答案")
    @NotBlank(message = "题目答案不能为空")
    @Size(max=65535, message="题目答案长度不能超过65535个字符")
    private String answer;

    @Schema(description = "答案解析")
    @Size(max=65535, message="答案解析长度不能超过65535个字符")
    private String analysis;

    @Schema(description = "得分")
    @NotNull(message = "得分不能为空")
    private Integer score;

    @Schema(description = "难度等级(1-5)")
    private Integer level;

    @Schema(description = "题目顺序")
    private Integer sequence;


}
